package cn.broadsense.thrid.param;

import cn.broadsense.common.exception.ServiceException;
import cn.broadsense.thrid.result.FtsDetailsResult;
import cn.hutool.core.util.StrUtil;
import lombok.Data;

/**
 * @author pengxin
 * @date 2022-10-11 10:38
 */
@Data
public class FtsDetailsParam extends BaseParam {

    private static final long serialVersionUID = 3467130129440840035L;
    /**
     * 查询类型;0-人,1-非机动车,2-机动车
     */
    private Integer type;

    /**
     * 记录id
     */
    private String recordId;

    /**
     * 抓拍时间  时间戳
     */
    private Long capTime;

    /**
     * 查询类型，0-实时,1-任务（当-U时必填）
     */
    private String searchType;

    @Override
    public void checkParam() {
        if (null == type) {
            throw new ServiceException("查询类型 不能为空");
        }
        if (StrUtil.isBlank(recordId)) {
            throw new ServiceException("记录id不能为空");
        }
    }

    @Override
    public Class getResultClass() {
        return FtsDetailsResult.class;
    }
}
